﻿@page "/logout"
@using Microsoft.AspNetCore.Authentication
@inject NavigationManager NavigationManager



@code {
	[CascadingParameter]
	public HttpContext HttpContext { get; set; }


	protected override async Task OnInitializedAsync()
	{
		await base.OnInitializedAsync();
		if (HttpContext.User.Identity.IsAuthenticated)
		{
			await HttpContext.SignOutAsync();
		}
		// let's refresh the page
		NavigationManager.NavigateTo("/login");
	}
}
